'use strict'
const fs = require('fs');
//duiduidui
class task {
    constructor() {
        this.param = '/*'
    }
    //创建资源
    async get(c) {
        var url = c.param.starPath;
        if (url === '') {
            try {
                let sqltext1 = `select *`
                    + ` from task where task_id < 6`
                var r1 = await c.service.psql.query(sqltext1)
                if (r1.rowCount == 0) {
                    return c.send('no data');
                }
                c.send(r1.rows);
                return
            }
            catch (err) {
                c.status(400).send('error');
            }
        }
    }

}


module.exports = task